package com.example.test;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.test.fragment.AddCarNumberFragment;
import com.example.test.fragment.BillDetailFragment;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

public class BilldetailActivity extends BaseActivity implements OnClickListener {

	@ViewInject(R.id.txt_title)
	private TextView txt_title;
	@ViewInject(R.id.imgbtn_left)
	private ImageView imgbtn_left;
	@ViewInject(R.id.rl_tiltebar_left)
	private  RelativeLayout rl_left;
	@ViewInject(R.id.rl_tiltebar_right)
	private RelativeLayout rl_right;
	@ViewInject(R.id.imgbtn_right)
	private ImageView imagebtn_right;
	private String title;
	private Intent intent;
	private String fromwhat;
	private int ids;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		mTintManager.setStatusBarTintEnabled(true);
		mTintManager.setStatusBarTintResource(R.color.darkwhite);
		setContentView(R.layout.activity_code_pay);
		ViewUtils.inject(this);
		txt_title.setText("账单详情");
		imgbtn_left.setBackgroundResource(R.drawable.title_back);
		imagebtn_right.setVisibility(View.INVISIBLE);
		intent = getIntent();
		fromwhat = intent.getStringExtra("fromwhat");
		ids = intent.getIntExtra("ids", 0);
		rl_left.setOnClickListener(this);
		BillDetailFragment fragment = new BillDetailFragment(fromwhat,ids);
		getSupportFragmentManager().beginTransaction()
				.replace(R.id.content_frame, fragment, "bill").commit();
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.rl_tiltebar_left:
			this.finish();
			break;

		default:
			break;
		}
	}
}
